﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common.Master" AutoEventWireup="true" EnableEventValidation="false"
    CodeBehind="ArchiveReceiveList.aspx.cs" Inherits="Web.Views.ArchiveFlowView.ArchiveReceiveList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="../../Javascript/UserControls.js"></script>
    <script type="text/javascript">


        $(function () {
            newinitTabs();

            $("#ctl00_ContentPlaceHolder1_BtnFilter").click(function () {

                var tab = $('.easyui-tabs').tabs('getSelected');
                var tabtitle = tab.panel('options').title;

                return true;
            });

            $("#btnShowFilter").click(function () {
                if ($(this).val() == '展开过滤') {
                    //$('#searchdialog').show();
                    OpenDialog();
                    $(this).val('隐藏过滤');
                }
                else {
                    //$('#searchdialog').hide();
                    HideDialog();
                    $(this).val('展开过滤');
                }

            });
        });

        //初始化tab
        function newinitTabs(selectEvent) {
            var key = $("#" + "ctl00_h_pagename").val();
            var cookieValue = getCookie(key);
            $('.easyui-tabs').tabs({
                onSelect: function (title, index) {
                    addCookie(key, title, 0);
                    if (title == "待办条目") {
                        //显示接收、退回
                        $("#ctl00_ContentPlaceHolder1_btnVerify").attr("disabled", false);
                        $("#ctl00_ContentPlaceHolder1_btnBack").attr("disabled", false);
                    }
                    else if (title == "已办条目") {
                        //隐藏接收、退回
                        $("#ctl00_ContentPlaceHolder1_btnVerify").attr("disabled", true);
                        $("#ctl00_ContentPlaceHolder1_btnBack").attr("disabled", true);
                    }

                    ShowCategoryBtn();

                    var archiveType = getQueryStringValue("archiveType");

                    //勘探开发-单井 实物 声像 不打印卷内
                    if (archiveType == 72 || archiveType == 9 || archiveType == 91 || archiveType == 92
            || archiveType == 93 || archiveType == 94 || archiveType == 8 || archiveType == 81
            || archiveType == 82 || archiveType == 83) {
                        $("#ctl00_ContentPlaceHolder1_btnPrintJuanCatagory").hide();
                    }

                    //盒内目录 文书+勘探综合类 
                    if (archiveType == 1 || archiveType == 71
                    || archiveType == 7101 || archiveType == 7102) {
                        $("#ctl00_ContentPlaceHolder1_btnPrintBoxCatagory").show();
                    }

                }
            }).tabs('select', cookieValue);
        }

        function ShowCategoryBtn() {
            //卷存储的，不需要显示盒内目录打印
            //件存储的，不需要显示卷内目录打印

            var archiveBaseType = '<%= BaseArchiveType %>';

            //卷
            if (archiveBaseType == 'BulidProject' || archiveBaseType == 'Equipment'
            || archiveBaseType == 'Account' || archiveBaseType == 'Technology') {
                $("#ctl00_ContentPlaceHolder1_btnPrintJuanCatagory").show();
                $("#ctl00_ContentPlaceHolder1_btnPrintBoxCatagory").hide();
            }
            else {
                $("#ctl00_ContentPlaceHolder1_btnPrintJuanCatagory").hide();
                $("#ctl00_ContentPlaceHolder1_btnPrintBoxCatagory").show();
            }
        }

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="toolbar2">
        <button type="button" class="sexybutton" id="btnVerify" runat="server" onserverclick="btnVerify_Click">
            <span><span><span class="disk">接收</span></span></span></button>
        <button type="button" class="sexybutton" id="btnBack" runat="server" onserverclick="btnBack_Click">
            <span><span><span class="cancel">退回</span></span></span></button>
            <button type="button" class="sexybutton" id="btnPrintHandoverCatagory" runat="server"  onserverclick="btnPrintHandoverCatagory_Click" >
            <span><span><span class="disk">打印档案交接文据</span></span></span></button>
            <button type="button" class="sexybutton" id="btnPrintJuanCatagory" runat="server"
            onserverclick="bnPrintJuanCatagory_Click">
            <span><span><span class="disk">打印卷内目录</span></span></span></button>
        <button type="button" class="sexybutton" id="btnPrintBoxCatagory" runat="server"
            onserverclick="bnPrintBoxCatagory_Click">
            <span><span><span class="disk">打印盒内目录</span></span></span></button>
        <button type="button" class="sexybutton" id="btnPrintBeikaoTable" runat="server"
            onserverclick="btnPrintBeikaoTable_Click">
            <span><span><span class="disk">打印备考表</span></span></span></button>
        <button type="button" class="sexybutton" id="btnShowFilter"  >展开过滤</button>
    </div>
    <ep:searchControl id="sch" runat="server" SearchEvent="sch_SearchEvent"></ep:searchControl>
    <div id="tt" class="easyui-tabs" border="false">
        <div title="待办条目">
            <div style="overflow: hidden;">
                <h3>
                    待办条目</h3>
                <ep:EPGridView ID="gvDocumentUndo" DataKeyNames="DataID" runat="server" Width="100%"
                    OnRowDataBound="gvUnTransfered_RowDataBound" ShowCheckBox="true" OnRowEditing="gvUnTransfered_RowEditing">
                    <Columns>
                        <asp:BoundField  HeaderStyle-Width="2%" ItemStyle-HorizontalAlign="Center" /> 
                        <asp:CommandField ButtonType="Button" ControlStyle-CssClass="btn" EditText="编辑" 
                            ShowEditButton="true"  HeaderText="操作" HeaderStyle-Width="5%"
                            ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="档号" DataField="ARCHIVENUM" HeaderStyle-Width="7%"
                            ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="提交人" DataField="CREATEUSERID" HeaderStyle-Width="10%"
                            ItemStyle-HorizontalAlign="Center" />
                        <asp:HyperLinkField HeaderText="题名" DataTextField="TITLE" DataNavigateUrlFormatString="ArchiveFlowEdit.aspx?archiveId={0}&archivetype=1&currentstatusname=办结审核中"
                    DataNavigateUrlFields="DataID" HeaderStyle-Width="20%" ItemStyle-HorizontalAlign="Left" />
                        <asp:BoundField HeaderText="立卷单位" DataField="FILEORGID" HeaderStyle-Width="8%" ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="来源" DataField="ARCHIVESOURCE" DataFormatString="{0:yyyy-MM-dd}"
                            HtmlEncode="false" HeaderStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="密级" DataField="F_SECURITYTYPE" HeaderStyle-Width="7%"
                            ItemStyle-HorizontalAlign="Center" />
                        
                        <asp:BoundField HeaderText="入库日期" DataField="CREATETIME" DataFormatString="{0:yyyy-MM-dd}"
                         HeaderStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
                    </Columns>
                </ep:EPGridView>
                <ep:AspNetPager SubmitButtonText=" GO " ID="pagerUndo" Height="26px"    Width="100%" CssClass="yahoo2" runat="server"
                    PageSize="10" LayoutType="Table" ShowCustomInfoSection="Right" CustomInfoClass="custom"
                    CustomInfoStyle=" clear:both;" ShowPageIndexBox="Always" SubmitButtonImageUrl="../Images/go.png"
                    ShowPageIndex="true" PageIndexBoxType="TextBox" CustomInfoHTML="第 %CurrentPageIndex% 页，共 %PageCount% 页，每页显示 %PageSize% 条，共 %RecordCount% 条"
                    OnPageChanging="pagerUntransfered_PageChanging"
                    AlwaysShow="false">
                </ep:AspNetPager>
            </div>
        </div>
        <div title="已办条目" style="overflow: visible;">
            <div style="overflow: hidden;">
                <h3>
                    已办条目</h3>
                <ep:EPGridView ID="gvDocumentDone" DataKeyNames="DataID" runat="server" Width="100%"  ShowCheckBox="true"
                    OnRowDataBound="gvTransfered_RowDataBound">
                    <Columns>
                        <asp:BoundField DataField="DATAID" HeaderStyle-Width="2%" ItemStyle-HorizontalAlign="Center" /> 
                        <asp:BoundField HeaderText="档号" DataField="ARCHIVENUM" HeaderStyle-Width="7%" ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="提交人" DataField="CREATEUSERID" HeaderStyle-Width="10%"
                            ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="题名" DataField="TITLE"  HeaderStyle-Width="20%" />
                        <asp:BoundField HeaderText="归档单位" DataField="FILEORGID" HeaderStyle-Width="18%" ItemStyle-HorizontalAlign="Left" />
                        <asp:BoundField HeaderText="全宗号" DataField="FULLFONDSNUM" HeaderStyle-Width="10%"
                            ItemStyle-HorizontalAlign="Center" />
                        <asp:BoundField HeaderText="密级" DataField="F_SECURITYTYPE" HeaderStyle-Width="7%"
                            ItemStyle-HorizontalAlign="Center" />
                        
                    </Columns>
                </ep:EPGridView>
                <ep:AspNetPager SubmitButtonText=" GO " ID="pagerDone" Height="26px"    Width="100%" CssClass="yahoo2" runat="server"
                    PageSize="10" LayoutType="Table" ShowCustomInfoSection="Right" CustomInfoClass="custom"
                    CustomInfoStyle=" clear:both;" ShowPageIndexBox="Always" SubmitButtonImageUrl="../Images/go.png"
                    ShowPageIndex="true" PageIndexBoxType="TextBox" CustomInfoHTML="第 %CurrentPageIndex% 页，共 %PageCount% 页，每页显示 %PageSize% 条，共 %RecordCount% 条"
                    OnPageChanging="pagerTransfered_PageChanging"
                    AlwaysShow="false">
                </ep:AspNetPager>
            </div>
        </div>
    </div>
    <asp:HiddenField ID="hiddenSHTG" runat="server" Value="接收" />
    <asp:HiddenField ID="hiddenBack" runat="server" Value="接收审核退回" />
    <asp:HiddenField ID="hiddenStatusName" runat="server" Value="接收审核中" />
</asp:Content>
